Skip to content

Remove deprecations for 26.10 dev cycle - #8435

Merged
jameslamb merged 3 commits into
NVIDIA:mainfrom
jcrist:remove-deprecations-2610
Aug 3, 2026
Merged

Remove deprecations for 26.10 dev cycle#8435
jameslamb merged 3 commits into
NVIDIA:mainfrom
jcrist:remove-deprecations-2610

Conversation

@jcrist

@jcrist jcrist commented Aug 3, 2026

Copy link
Copy Markdown
Member

This removes a few deprecated features that can be removed in the 26.10 development cycle:

  • Removes the deprecated cuml.experimental.linear_model namespace
  • Removes the deprecated cuml.preprocessing.text namespace
  • Removes the deprecated metric_arg to pairwise_distances

Part of #8225.

@jcrist jcrist self-assigned this Aug 3, 2026
@jcrist
jcrist requested a review from a team as a code owner August 3, 2026 16:37
@jcrist jcrist added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Aug 3, 2026
@jcrist
jcrist requested a review from viclafargue August 3, 2026 16:37
@github-actions github-actions Bot added the Cython / Python Cython or Python issue label Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 99ec4e8b-7e8d-4a9c-a51c-54150d5c87f8

📥 Commits

Reviewing files that changed from the base of the PR and between 9688f2a and 2d688b9.

📒 Files selected for processing (2)
  • python/cuml/cuml/metrics/pairwise_distances.pyx
  • python/cuml/tests/test_metrics.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • python/cuml/tests/test_metrics.py
  • python/cuml/cuml/metrics/pairwise_distances.pyx

📝 Walkthrough

Summary by CodeRabbit

  • Breaking Changes
    • Removed the experimental Lars estimator from the public API.
    • Removed the PorterStemmer text preprocessing feature, supporting utilities, tests, and documentation.
    • Removed the deprecated metric_arg parameter from pairwise distance calculations.
    • Pairwise distances now accept p only for Minkowski metrics; unsupported parameters are rejected.
    • nan_euclidean metrics are handled before metric-parameter validation.

Walkthrough

The change removes the Porter stemmer implementation and exports, removes the experimental Lars export, updates pairwise_distances parameter handling, deletes related tests and documentation, and refreshes SPDX notices.

Changes

API and metric cleanup

Layer / File(s) Summary
Remove Porter stemmer and deprecated exports
python/cuml/cuml/preprocessing/..., docs/source/api/cuml.preprocessing.rst, python/cuml/tests/stemmer_tests/*, python/cuml/cuml/experimental/linear_model/__init__.py, python/cuml/tests/test_lars.py
The GPU-backed PorterStemmer, helper modules, exports, documentation entry, and related tests are removed. The experimental Lars export and deprecation test are also removed.
Update pairwise metric handling
python/cuml/cuml/metrics/pairwise_distances.pyx, python/cuml/tests/test_metrics.py
nan_euclidean dispatches before parameter handling. Deprecated metric_arg support is removed. Only minkowski extracts p; other keywords undergo unknown-parameter validation.
Refresh SPDX notices
python/cuml/cuml/preprocessing/__init__.py, python/cuml/tests/test_lars.py, python/cuml/tests/test_metrics.py
Copyright attribution and year ranges are updated in the affected files.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues

  • rapidsai/cuml#8225 — The pull request implements the planned removal of the deprecated APIs and metric_arg handling.

Suggested labels: doc, breaking

Suggested reviewers: viclafargue, divyegala, jameslamb

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the removal of deprecated features planned for the 26.10 development cycle.
Description check ✅ Passed The description directly matches the changes by listing the removed namespaces and the deprecated metric_arg parameter.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@python/cuml/cuml/metrics/pairwise_distances.pyx`:
- Around line 336-339: Update the keyword validation in the Minkowski branch of
pairwise distance handling: pop the supported p argument first, then reject any
remaining kwds with the existing TypeError path so metric_arg and other unknown
keywords are not ignored. Add a regression case in test_metrics.py confirming
metric="minkowski" with metric_arg raises TypeError.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8994925e-fe87-42c7-9862-59d32a969dff

📥 Commits

Reviewing files that changed from the base of the PR and between 50d48b3 and 9688f2a.

📒 Files selected for processing (20)
  • docs/source/api/cuml.preprocessing.rst
  • python/cuml/cuml/experimental/linear_model/__init__.py
  • python/cuml/cuml/metrics/pairwise_distances.pyx
  • python/cuml/cuml/preprocessing/__init__.py
  • python/cuml/cuml/preprocessing/text/__init__.py
  • python/cuml/cuml/preprocessing/text/stem/__init__.py
  • python/cuml/cuml/preprocessing/text/stem/porter_stemmer.py
  • python/cuml/cuml/preprocessing/text/stem/porter_stemmer_utils/__init__.py
  • python/cuml/cuml/preprocessing/text/stem/porter_stemmer_utils/consonant_vowel_utils.py
  • python/cuml/cuml/preprocessing/text/stem/porter_stemmer_utils/len_flags_utils.py
  • python/cuml/cuml/preprocessing/text/stem/porter_stemmer_utils/measure_utils.py
  • python/cuml/cuml/preprocessing/text/stem/porter_stemmer_utils/porter_stemmer_rules.py
  • python/cuml/cuml/preprocessing/text/stem/porter_stemmer_utils/suffix_utils.py
  • python/cuml/tests/stemmer_tests/test_len_utils.py
  • python/cuml/tests/stemmer_tests/test_porter_stemmer_rules.py
  • python/cuml/tests/stemmer_tests/test_stemmer.py
  • python/cuml/tests/stemmer_tests/test_steps.py
  • python/cuml/tests/stemmer_tests/test_suffix_utils.py
  • python/cuml/tests/test_lars.py
  • python/cuml/tests/test_metrics.py
💤 Files with no reviewable changes (16)
  • python/cuml/cuml/preprocessing/text/init.py
  • python/cuml/cuml/experimental/linear_model/init.py
  • python/cuml/cuml/preprocessing/text/stem/porter_stemmer_utils/init.py
  • python/cuml/cuml/preprocessing/text/stem/init.py
  • python/cuml/cuml/preprocessing/text/stem/porter_stemmer_utils/consonant_vowel_utils.py
  • docs/source/api/cuml.preprocessing.rst
  • python/cuml/cuml/preprocessing/text/stem/porter_stemmer.py
  • python/cuml/tests/stemmer_tests/test_len_utils.py
  • python/cuml/tests/stemmer_tests/test_suffix_utils.py
  • python/cuml/cuml/preprocessing/text/stem/porter_stemmer_utils/len_flags_utils.py
  • python/cuml/cuml/preprocessing/text/stem/porter_stemmer_utils/measure_utils.py
  • python/cuml/tests/stemmer_tests/test_steps.py
  • python/cuml/tests/stemmer_tests/test_porter_stemmer_rules.py
  • python/cuml/tests/stemmer_tests/test_stemmer.py
  • python/cuml/cuml/preprocessing/text/stem/porter_stemmer_utils/suffix_utils.py
  • python/cuml/cuml/preprocessing/text/stem/porter_stemmer_utils/porter_stemmer_rules.py

Comment thread python/cuml/cuml/metrics/pairwise_distances.pyx Outdated
@jcrist
jcrist force-pushed the remove-deprecations-2610 branch from 9688f2a to 2d688b9 Compare August 3, 2026 16:46
@jameslamb
jameslamb merged commit e84ceb0 into NVIDIA:main Aug 3, 2026
94 checks passed
@jcrist
jcrist deleted the remove-deprecations-2610 branch August 3, 2026 19:24
rapids-bot Bot pushed a commit that referenced this pull request Aug 4, 2026
This removes support for the following deprecated `output_type` values:

- `"numba"`
- `"dataframe"`
- `"series"`
- `"df_obj"`
- `"array"`

The latter 4 are all aliases for other concrete types (e.g. `"array"` is the same as `"cupy"`). For `"numba"`, `cuml` now treats numba inputs the same as any other non-cupy input type that implements `__cuda_array_interface__` (coerces to `cupy`, and returns cupy outputs by default). This code path is still tested in the generic estimator input/output types, but in most other places where `numba` was explicitly part of the parametrized tests we've opted to simplify to remove that branch as duplicative of `cupy` inputs.

This also removes the deprecated `sparse_pairwise_distances` function. This should have been handled in #8435, but was accidentally missed. This is the only remaining deprecation in need of removal for 26.10 - I'm including it here to avoid another PR.

Part of #8225.

Authors:
  - Jim Crist-Harif (https://github.com/jcrist)

Approvers:
  - Simon Adorf (https://github.com/csadorf)

URL: #8439
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Cython / Python Cython or Python issue improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants